import { Map } from 'immutable'
// 对象  Map
// 数组  List
// 定义数据时使用 immutable
const reducer = (state = Map({
  proList: [],
  recommendList: []
}), action) => {
  console.log('payload',action.payload)
  switch (action.type) {
    case 'CHANGE_PRO_LIST':
      return state.set('proList', action.payload)
    case 'CHANGE_RECOMMEND_LIST':
      return state.set('recommendList', action.payload)
    default:
      return state
  }
}
export default reducer